<!-- HTML header for doxygen 1.8.20-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
	<meta http-equiv="X-UA-Compatible" content="IE=9"/>
	<meta name="generator" content="Doxygen 1.9.4"/>
	<meta name="viewport" content="width=device-width, initial-scale=1"/>
	<title>Raspberry Pi Pico SDK: pico_btstack</title>
	<!-- <link href="tabs.css" rel="stylesheet" type="text/css"/> -->
	<script type="text/javascript" src="jquery.js"></script>
	<script type="text/javascript" src="dynsections.js"></script>
	<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
	<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
    <link href="https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500&display=swap" rel="stylesheet">
	<link href="doxygen.css" rel="stylesheet" type="text/css" />
	<link href="normalise.css" rel="stylesheet" type="text/css"/>
<link href="main.css" rel="stylesheet" type="text/css"/>
<link href="styles.css" rel="stylesheet" type="text/css"/>
</head>
<body>
	<div class="navigation-mobile">
		<div class="logo--mobile">
			<a href="/"><img src="logo-mobile.svg" alt="Raspberry Pi"></a>
		</div>
		<div class="navigation-toggle">
			<span class="line-1"></span>
			<span class="line-2">
				<p>Menu Toggle</p>
			</span>
			<span class="line-3"></span>
		</div>
	</div>
	<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
		<div class="logo">
			<a href="index.html"> <img src="logo.svg" alt="Raspberry Pi"></a>
			<span style="display: inline-block; margin-top: 10px;">
				v2.1.0
			</span>
		</div>
		<div class="navigation-footer">
			<img src="logo-mobile.svg" alt="Raspberry Pi">
			<a href="https://www.raspberrypi.com/" target="_blank">By Raspberry Pi Ltd</a>
		</div>
<!-- 		<div class="search">
			<form>
				<input type="search" name="search" id="search" placeholder="Search">
				<input type="submit" value="Search">
			</form>
		</div> -->
<!-- Generated by Doxygen 1.9.4 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search",'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function(){initNavTree('group__pico__btstack.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle"><div class="title">pico_btstack<div class="ingroups"><a class="el" href="group__networking.html">Networking Libraries</a></div></div></div>
</div><!--header-->
<div class="contents">

<p>Integration/wrapper libraries for <a href="https://github.com/bluekitchen/btstack">BTstack</a> the documentation for which is <a href="https://bluekitchen-gmbh.com/btstack/">here</a>.  
<a href="#details">More...</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga88f89a9b3339ebb3c570db896b66d65a"><td class="memItemLeft" align="right" valign="top">const hal_flash_bank_t *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__pico__btstack.html#ga88f89a9b3339ebb3c570db896b66d65a">pico_flash_bank_instance</a> (void)</td></tr>
<tr class="memdesc:ga88f89a9b3339ebb3c570db896b66d65a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return the singleton BTstack HAL flash instance, used for non-volatile storage.  <a href="group__pico__btstack.html#ga88f89a9b3339ebb3c570db896b66d65a">More...</a><br /></td></tr>
<tr class="separator:ga88f89a9b3339ebb3c570db896b66d65a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga9aa9b63d7b500add5590ea2d8a4347ed"><td class="memItemLeft" align="right" valign="top">const btstack_run_loop_t *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__pico__btstack.html#ga9aa9b63d7b500add5590ea2d8a4347ed">btstack_run_loop_async_context_get_instance</a> (<a class="el" href="structasync__context.html">async_context_t</a> *context)</td></tr>
<tr class="memdesc:ga9aa9b63d7b500add5590ea2d8a4347ed"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize and return the singleton BTstack run loop instance that integrates with the <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context.">async_context</a> API.  <a href="group__pico__btstack.html#ga9aa9b63d7b500add5590ea2d8a4347ed">More...</a><br /></td></tr>
<tr class="separator:ga9aa9b63d7b500add5590ea2d8a4347ed"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga739fcedddb9214a7c86995677b31c09a"><td class="memItemLeft" align="right" valign="top"><a id="ga739fcedddb9214a7c86995677b31c09a" name="ga739fcedddb9214a7c86995677b31c09a"></a>
const btstack_chipset_t *&#160;</td><td class="memItemRight" valign="bottom"><b>btstack_chipset_cyw43_instance</b> (void)</td></tr>
<tr class="memdesc:ga739fcedddb9214a7c86995677b31c09a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return the singleton BTstack chipset CY43 API instance. <br /></td></tr>
<tr class="separator:ga739fcedddb9214a7c86995677b31c09a"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<p >Integration/wrapper libraries for <a href="https://github.com/bluekitchen/btstack">BTstack</a> the documentation for which is <a href="https://bluekitchen-gmbh.com/btstack/">here</a>. </p>
<p >A supplemental license for BTstack (in addition to the stock BTstack licensing terms) is provided <a href="https://github.com/raspberrypi/pico-sdk/blob/master/src/rp2_common/pico_btstack/LICENSE.RP">here</a>.</p>
<p >The <code><b>pico_btstack_ble</b> library</code> adds the support needed for Bluetooth Low Energy (BLE). The <code><b>pico_btstack_classic</b> library</code> adds the support needed for Bluetooth Classic. You can link to either library individually, or to both libraries thus enabling dual-mode support provided by BTstack.</p>
<p >To use BTstack you need to provide a <code>btstack_config.h</code> file in your source tree and add its location to your include path. The BTstack configuration macros <code>ENABLE_CLASSIC</code> and <code>ENABLE_BLE</code> are defined for you when you link the <code>pico_btstack_classic</code> and <code>pico_btstack_ble</code> libraries respectively, so you should not define them yourself.</p>
<p >For more details, see <a href="https://bluekitchen-gmbh.com/btstack/develop/#how_to/">How to configure BTstack</a> and the relevant <a href="https://github.com/raspberrypi/pico-examples#pico-w-bluetooth">pico-examples</a>.</p>
<p >The follow libraries are provided for you to link.</p><ul>
<li><code><b>pico_btstack_ble</b> -</code> Adds Bluetooth Low Energy (LE) support.</li>
<li><code><b>pico_btstack_classic</b> -</code> Adds Bluetooth Classic support.</li>
<li><code><b>pico_btstack_sbc_encoder</b> -</code> Adds Bluetooth Sub Band Coding (SBC) encoder support.</li>
<li><code><b>pico_btstack_sbc_decoder</b> -</code> Adds Bluetooth Sub Band Coding (SBC) decoder support.</li>
<li><code><b>pico_btstack_bnep_lwip</b> -</code> Adds Bluetooth Network Encapsulation Protocol (BNEP) support using LwIP.</li>
<li><code><b>pico_btstack_bnep_lwip_sys_freertos</b> -</code> Adds Bluetooth Network Encapsulation Protocol (BNEP) support using LwIP with FreeRTOS for NO_SYS=0.</li>
<li><code><b>pico_btstack_mesh</b> -</code> Adds Bluetooth mesh support from BTstack.</li>
</ul>
<dl class="section note"><dt>Note</dt><dd>The CMake function pico_btstack_make_gatt_header can be used to run the BTstack compile_gatt tool to make a GATT header file from a BTstack GATT file.</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__pico__btstack__cyw43.html" title="Low-level Bluetooth HCI support.">pico_btstack_cyw43</a> in <a class="el" href="group__pico__cyw43__driver.html" title="A wrapper around the lower level cyw43_driver, that integrates it with pico_async_context for handlin...">pico_cyw43_driver</a>, which adds the cyw43 driver support needed for BTstack including BTstack run loop support. </dd></dl>
<h2 class="groupheader">Function Documentation</h2>
<a id="ga9aa9b63d7b500add5590ea2d8a4347ed" name="ga9aa9b63d7b500add5590ea2d8a4347ed"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga9aa9b63d7b500add5590ea2d8a4347ed">&#9670;&nbsp;</a></span>btstack_run_loop_async_context_get_instance()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const btstack_run_loop_t * btstack_run_loop_async_context_get_instance </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structasync__context.html">async_context_t</a> *&#160;</td>
          <td class="paramname"><em>context</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Initialize and return the singleton BTstack run loop instance that integrates with the <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context.">async_context</a> API. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">context</td><td>the <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context.">async_context</a> instance that provides the abstraction for handling asynchronous work. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the BTstack run loop instance </dd></dl>

</div>
</div>
<a id="ga88f89a9b3339ebb3c570db896b66d65a" name="ga88f89a9b3339ebb3c570db896b66d65a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga88f89a9b3339ebb3c570db896b66d65a">&#9670;&nbsp;</a></span>pico_flash_bank_instance()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const hal_flash_bank_t * pico_flash_bank_instance </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Return the singleton BTstack HAL flash instance, used for non-volatile storage. </p>
<dl class="section note"><dt>Note</dt><dd>By default two sectors at the end of flash are used (see <code>PICO_FLASH_BANK_STORAGE_OFFSET</code> and <code>PICO_FLASH_BANK_TOTAL_SIZE</code>) </dd></dl>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->

	<script src="main.js"></script>
</body>
</html>